package edu.bbu.BS.client;

import edu.bbu.BS.client.model.Author;
import edu.bbu.bs.backend.dtos.AuthorDTO;

public class AuthorAssembler {
	public static Author DTOToModel(AuthorDTO authorDTO) {
		Author author = new Author();

		author.setId(authorDTO.getId());
		author.setFirstName(authorDTO.getFirstName());
		author.setLastName(authorDTO.getLastName());

		return author;
	}

	public static AuthorDTO ModelToDTO(Author author) {
		AuthorDTO authorDTO = new AuthorDTO();

		authorDTO.setId(author.getId());
		authorDTO.setFirstName(author.getFirstName());
		authorDTO.setLastName(author.getLastName());

		return authorDTO;
	}
}
